package com.sansecy.monitor.see;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * @Description 包含log信息
 * @Date 2019-08-04 12:22
 * @Created by caoyu
 */
public class LogBean {
    private int id;
    private String tag;
    private long tookTime;
    private String requestTime;
    private String statusCode;
    private String host;
    private String method;
    private String url;
    private String path;
    private String requestBody;
    private String responseBody;
    private String requestUrl;
    private String fullUrl;
    private String params;
    private String decryptParams;
    private String decryptResponse;
    private String requestMediaType;
    private String ResponseMediaType;
    private Throwable exception;
    private String message;
    private long gzipSize;
    private String trafficSize;

    public LogBean() {
    }

    public long getTookTime() {
        return tookTime;
    }

    public void setTookTime(long tookTime) {
        this.tookTime = tookTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public static String long2Str(long time, String paramString) {
        return (new SimpleDateFormat(paramString, Locale.getDefault())).format(new Date(time));
    }

    public void setRequestTime(String requestTime) {
        this.requestTime = requestTime;
    }

    public String getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(long requestTime) {
        this.requestTime = long2Str(requestTime, "MM-dd HH:mm:ss");
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getRequestBody() {
        return requestBody;
    }

    public void setRequestBody(String requestBody) {
        this.requestBody = requestBody;
    }

    public String getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getFullUrl() {
        return fullUrl;
    }

    public void setFullUrl(String fullUrl) {
        this.fullUrl = fullUrl;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getDecryptParams() {
        return decryptParams;
    }

    public void setDecryptParams(String decryptParams) {
        this.decryptParams = decryptParams;
    }

    public String getRequestMediaType() {
        return requestMediaType;
    }

    public void setRequestMediaType(String requestMediaType) {
        this.requestMediaType = requestMediaType;
    }

    public String getResponseMediaType() {
        return ResponseMediaType;
    }

    public void setResponseMediaType(String responseMediaType) {
        ResponseMediaType = responseMediaType;
    }

    public String getDecryptResponse() {
        return decryptResponse;
    }

    public void setDecryptResponse(String decryptResponse) {
        this.decryptResponse = decryptResponse;
    }

    public long getGzipSize() {
        return gzipSize;
    }

    public void setGzipSize(long gzipSize) {
        this.gzipSize = gzipSize;
    }

    public String getTrafficSize() {
        return trafficSize;
    }

    public void setTrafficSize(String trafficSize) {
        this.trafficSize = trafficSize;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Throwable getException() {
        return exception;
    }

    public void setException(Throwable exception) {
        this.exception = exception;
    }
}
